home *** CD-ROM | disk | FTP | other *** search
/ Packard Bell - Internet on a CD / internet on a cd.cdr / Internet / sites / Clementine_NASA / clemdsrc.hqx / TESampleGlue.a < prev    next >
Encoding:
Text File  |  1991-04-17  |  2.7 KB  |  83 lines

  1. ;
  2. ;    Apple Macintosh Developer Technical Support
  3. ;
  4. ;    MultiFinder-Aware TextEdit Sample Application
  5. ;
  6. ;    TESample
  7. ;
  8. ;    TESampleGlue.a    -    Assembler Source
  9. ;
  10. ;    Copyright ⌐ Apple Computer, Inc. 1989-1990
  11. ;    All rights reserved.
  12. ;
  13. ;    Versions:    
  14. ;                1.00                08/88
  15. ;                1.01                11/88
  16. ;                1.02                04/89    MPW 3.1
  17. ;                1.03                02/90    MPW 3.2
  18. ;
  19. ;    Components:
  20. ;                TESample.c            Feb.  1, 1990
  21. ;                TESampleGlue.a        Feb.  1, 1990
  22. ;                TESample.r            Feb.  1, 1990
  23. ;                TESample.h            Feb.  1, 1990
  24. ;                TESample.make        Feb.  1, 1990
  25. ;
  26. ;    TESample is an example application that demonstrates how 
  27. ;    to initialize the commonly used toolbox managers, operate 
  28. ;    successfully under MultiFinder, handle desk accessories and 
  29. ;    create, grow, and zoom windows. The fundamental TextEdit 
  30. ;    toolbox calls and TextEdit autoscroll are demonstrated. It 
  31. ;    also shows how to create and maintain scrollbar controls.
  32. ;
  33. ;    It does not by any means demonstrate all the techniques you 
  34. ;    need for a large application. In particular, Sample does not 
  35. ;    cover exception handling, multiple windows/documents, 
  36. ;    sophisticated memory management, printing, or undo. All of 
  37. ;    these are vital parts of a normal full-sized application.
  38. ;
  39. ;    This application is an example of the form of a Macintosh 
  40. ;    application; it is NOT a template. It is NOT intended to be 
  41. ;    used as a foundation for the next world-class, best-selling, 
  42. ;    600K application. A stick figure drawing of the human body may 
  43. ;    be a good example of the form for a painting, but that does not 
  44. ;    mean it should be used as the basis for the next Mona Lisa.
  45. ;
  46. ;    We recommend that you review this program or Sample before 
  47. ;    beginning a new application. Sample is a simple app. which doesn╒t 
  48. ;    use TextEdit or the Control Manager.
  49. ;
  50.  
  51. ;
  52. ;    AsmClikLoop
  53. ;
  54. ;    This routine gets called by the TextEdit Manager from TEClick.
  55. ;    It calls the old, default click loop routine that scrolls the
  56. ;    text, and then calls our own Pascal routine that handles
  57. ;    tracking the scroll bars to follow along.  It doesn't bother
  58. ;    with saving registers A0 and D0, because they are trashed
  59. ;    anyway by TextEdit.
  60. ;
  61.  
  62. AsmClikLoop    PROC        EXPORT
  63.  
  64.             IMPORT        GETOLDCLIKLOOP
  65.             IMPORT        PASCALCLIKLOOP
  66.             
  67.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  68.             CLR.L        -(SP)                ; make space for procedure pointer
  69.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  70.             MOVEA.L        (SP)+,A0            ; into A0
  71.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  72.             
  73.             JSR            (A0)                ; and execute old clikLoop
  74.  
  75.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  76.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  77.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  78.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  79.             RTS
  80.  
  81.             END 
  82.  
  83.